package yzserver.sx4a.dao.ibatis;

import com.sitech.ibnms.core.BaseIbnmsDao;
import yzserver.sx4a.dao.IJobDao;
import yzserver.sx4a.domain.JobDomain;

import java.util.HashMap;
import java.util.List;

public class JobDaoImpl extends BaseIbnmsDao implements IJobDao {


    @Override
    public JobDomain selJob(String jobid) {
        HashMap map = new HashMap();
        map.put("jobid",jobid);
        return (JobDomain)querySingle("shanxi_selJob",map);
    }

    @Override
    public void addJob(JobDomain job) throws Exception {
        insert("shanxi_addJob",job);
    }

    @Override
    public void updJob(JobDomain job) throws Exception {
        update("shanxi_updJob",job);
    }

    @Override
    public void delJob(String jobid) throws Exception {
        HashMap map = new HashMap();
        map.put("jobid",jobid);
        delete("shanxi_delJob",map);
    }

    @Override
    public List<JobDomain> selAllJob(String jobid) {
        HashMap map = new HashMap();
        map.put("jobid",jobid);
        return (List<JobDomain>)query("shanxi_selAllJob", map);
    }
}
